package com.yundingai.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yundingai.domain.entity.AllRole;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
* @author liyuxiang
* @description 针对表【all_role(角色表：可以区分不同用户、管理员权限与会员等级)】的数据库操作Mapper
* @createDate 2025-07-16 12:50:48
* @Entity com.yundingai.domain.entity.AllRole
*/
@Mapper
public interface AllRoleMapper extends BaseMapper<AllRole> {

    // 分配默认角色
    @Insert("insert into rel_user_role (role_id, user_id) values (2, #{userId})")
    void assignDefaultRole(int userId);

}




